<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>${title}</title>
<style>
body {  font-family: arial,verdana, sans-serif; font-size: 12px;}
.easyui-accordion ul li{
	height: 30px;
}
.easyui-accordion ul li div {
	border: 1px solid white
}
</style>
<link rel="stylesheet" type="text/css" href="static/js/themes/defalut.css">
<link rel="stylesheet" type="text/css" href="static/js/themes/public.css">
<link rel="stylesheet" type="text/css" href="static/js/themes/ddspstyle.css">

<#if Session.SESSION_USER.parentOrgId gt 0 >
<link rel="stylesheet" type="text/css" href="static/js/themes/ui-sunny/easyui.css">
<#else>
<link rel="stylesheet" type="text/css" href="static/js/themes/default/easyui.css">
</#if>
<link rel="stylesheet" type="text/css" href="static/js/themes/icon.css">
<script type="text/javascript" src="static/js/jquery.min.js"></script>
<script type="text/javascript" src="static/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="static/js/extEasyUI.js"></script>
<script type="text/javascript" src="static/js/index.js"></script>
<!-- <script type="text/javascript" src="static/highcharts/highcharts.js"></script>
<script type="text/javascript" src="static/highcharts/highcharts-more.js"></script>  -->
<script type="text/javascript">
		var _menus;
		$(function() {
			app_ajax(
					'pms/left.do',
					'',
					function (data) {
						_menus = data;
						initLeftMenu();//加载左侧菜单
					},
					null);
			findControl();
			warnText = $("#warn").html();
			showWarn();
			setInterval(
					function () {
						showWarn();
						findControl();
					}
					, 1 * 60 * 1000);

			//查询该用户是否长时间未更换密码
			$.ajax({
				url: "pms/findUserHistoryPWdDateCount.do",
				data: {
				},
				dataType: 'json',
				type: 'post',
				success: function (json) {
					//在有效期间提前7天给出更换密码提示
					if(json.success==="true"){
						//给提示
						window.alert("请在"+json.days+"天内更换密码，否则账号将被冻结！")
					}
				}

			});
		});

		function initLeftMenu(){
			if(_menus){
				InitLeftMenu();
				tabClose();
				tabCloseEven();
			}
		}
		function show(id) {
			openDialog($("#dlg"),'pms/user_edit.jsp?f_pu_id='+id);
		}
		function updatePassword(id) {
			openDialog($("#dlg1"),'pms/updatePassword.jsp?f_pu_id='+id);
		}

		var warnText="";
		function showWarn() {//"warn"
			app_ajax('warn/warn_list.do',
					'f_sw_name=&f_sw_status=1&f_sw_type=1&page=1&rows=1',
					function(data) {
						if (data.rows&&data.rows.length>0) {
							var desc=data.rows[0].f_sw_desc;
							var f_sw_onlinedate=data.rows[0].f_sw_onlinedate;
							var f_sw_offlinedate=data.rows[0].f_sw_offlinedate;
							desc=cutdesc(desc);
							desc=$.trim(desc);
							if(""!=desc&&""!=f_sw_onlinedate&&""!=f_sw_offlinedate){
								var date=new Date();
								var on=toDate(f_sw_onlinedate);
								var off=toDate(f_sw_offlinedate);
								if(date>on&&date<off){
									$("#warn").html(desc);
									return;
								}
							}
						}
						$("#warn").html(warnText);
					}
			);
		}
		function toDate(str){
			if(str.indexOf(".")!=-1)
				str=str.substring(0,str.indexOf("."));
			return new Date(str.replace("-", "/").replace("-", "/"));
		}
		function cutdesc(str) {
			try {
				var str1 = str.replace(/<[^>]+>/g, "");
				return str1.replace(/&amp;/g, '&');
			} catch (e) {
			}
		}

// 		function showOutlinkStatus(){
// 			openDialog($('#outlinkStatus'),'out_link_control/out_link_control_main.jsp');
// 		}
		function findControl() {
			$.ajax({
				url:"out_link_control/findControlFinal.do",
				dataType : 'json',
				data : {},
				type : 'get',
				success:function(data) {
					if(data){
						var allStatus=data;
						for (var i in allStatus) {
							switch (allStatus[i]) {
							case "1":
								if($("#"+i))
									$("#"+i).html("否");
								break;
							case "2":
								if($("#"+i))
									$("#"+i).html("是");
								break;
							default:
								if($("#"+i))
									$("#"+i).html("未知");
								break;
							}
						}
					}
				}
			});
}
    </script>
</head>
<body class="easyui-layout">
	<noscript>
		<div
			style="position: absolute; z-index: 100000; height: 1024px; top: 0px; left: 0px; width: 100%; background: white; text-align: center;">
			抱歉，请开启脚本支持！</div>
	</noscript>
	<div data-options="region:'north',href:'',split:false,border:false"
		style="overflow: hidden; height: 50px;">
		<div class="panel-header panel-title"
			style="width: 100%; height: 30px;">
			<div style="line-height: 30px; font-size: 16px;">
				<img src="static/images/blocks.gif" width="20" height="20"
					align="absmiddle" />${title}
			</div>
			<div style="position: absolute; right: 13px; bottom: 0px;font-size: 14px;">
				欢迎您 ${Session.SESSION_USER.f_pu_name}
				 <a href="javascript:void(0);" style="font-size: 15px;"
					class="easyui-menubutton" menu="#layout_north_kzmbMenu"
					iconCls="icon-help">控制面板</a> <a href="javascript:void(0);"
					class="easyui-menubutton" menu="#layout_north_zxMenu"
					iconCls="icon-back">注销</a>
			</div>
			<div id="layout_north_kzmbMenu" style="width: 100px; display: none;font-size: 15px;">
				<div>
					<a href="javascript:void(0);"
						onclick="show(${Session.SESSION_USER.f_pu_id});" id="grxx">个人信息</a>
				</div>
				<div class="menu-sep"></div>
				<div>
					<a href="javascript:void(0);"
						onclick="updatePassword(${Session.SESSION_USER.f_pu_id});"
						id="editpass">修改密码</a>
				</div>
				<div class="menu-sep"></div>
			</div>
			<div id="layout_north_zxMenu" style="width: 100px; display: none;">
				<div class="menu-sep"></div>
				<div>
					<a href="loginOut.do" id="loginOut">安全退出</a>
				</div>
			</div>
		</div>
	</div>

	<div id="dlg" class="easyui-dialog"
		style="width: 790px; height: 585px; padding-top: 0px;"
		data-options="title: '用户管理', iconCls:'icon-save',modal:true,closed:true,buttons:'#dlg_buttons'">
		<iframe scrolling="auto" frameborder="0"
			style="width: 100%; height: 99%;"></iframe>
	</div>

	<div data-options="region:'west',hide:true,split:true" title="导航菜单"
		style="width: 180px;" id="west">
		<div id="nav" class="easyui-accordion"
			data-options="border:false">
			<!--  导航内容 -->
		</div>
	</div>

	<div id="mainPanle" data-options="region:'center'" style="background: #eee; overflow-y: hidden">
		<div id="tabs" class="easyui-tabs" fit="true" border="false">
			<div title="欢迎使用" style="padding: 0px; overflow: hidden; color: black;">
				<div style="padding:14px;">
				  <div style="z-index: 3; text-align: left; font-size: 18px" id="xtgg">
					系统公告：
					<marquee direction="LEFT" onmouseover="this.stop()"
						onmouseout="this.start()" behavior="scroll" width="80%">
						<font id="warn" style="color: red;font-size: 19px;">Hello !欢迎进入${title}，您可以对左边所有的菜单进行操作</font>
					</marquee>
				  </div>
				  <div style="margin-bottom:50%;text-align: center; font-size: 24px; font-weight: bold; padding-bottom: 10px;" id="hytp">欢迎进入${title}</div>
				  	<div  class="easyui-panel" title="当前外链放通状态" style="height:auto;padding:10px;width:50%;">
				<!-- 		<div id="toolbar" class="easyui_datagrid_toolbar" style=""> -->
						<div class="easyuiSearch">
								<table cellspacing="0" cellpadding="0" width="90%">
									<tr>
										<td align="left" width="10%">屏蔽可管控外链：</td>
										<td id="control_link_ab" align="left" width="7%">未知</td>
										<td align="left" width="10%">放通到公共：</td>
										<td id="go_common_ab" align="left" width="7%">未知</td>
									</tr>
								</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div id="mm" class="easyui-menu" style="width: 150px;">
		<div id="mm-tabupdate">刷新</div>
		<div class="menu-sep"></div>
		<div id="mm-tabclose">关闭</div>
		<div id="mm-tabcloseall">全部关闭</div>
		<div id="mm-tabcloseother">除此之外全部关闭</div>
		<div class="menu-sep"></div>
		<div id="mm-tabcloseright">当前页右侧全部关闭</div>
		<div id="mm-tabcloseleft">当前页左侧全部关闭</div>
		<div class="menu-sep"></div>
		<div id="mm-exit">退出</div>
	</div>
	<div id="dlg" class="easyui-dialog"
		style="width: 600px; height: 470px; padding-top: 0px;"
		data-options="title:'个人信息', iconCls:'icon-save',modal:true,closed:true,buttons:'#dlg_buttons'">
		<iframe scrolling="auto" frameborder="0"
			style="width: 100%; height: 99%;"></iframe>
	</div>
	<div id="dlg1" class="easyui-dialog"
		style="width: 400px; height: 350px; padding-top: 0px;"
		data-options="title:'修改密码', iconCls:'icon-save',modal:true,closed:true,buttons:'#dlg_buttons'">
		<iframe scrolling="auto" frameborder="0"
			style="width: 100%; height: 99%;"></iframe>
	</div>
</body>
</html>
